package com.pz.cloud.framework.workflow.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pz.cloud.framework.business.workflow.entity.ProcessInfo;
import com.pz.cloud.framework.business.workflow.service.IProcessInfoService;
import com.pz.cloud.framework.workflow.mapper.ProcessInfoMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 工作流服务
 * @author mazezhan
 */
@Transactional(rollbackFor = Exception.class)
@Service
public class ProcessInfoServiceImpl extends ServiceImpl<ProcessInfoMapper,ProcessInfo> implements IProcessInfoService {
    @Override
    public ProcessInfo getByRealtedId(String relatedId) {
        LambdaQueryWrapper<ProcessInfo> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(ProcessInfo::getRelatedId,relatedId);
        return this.getOne(queryWrapper);
    }
}
